<form class="form-horizontal" #valForm="ngForm">
	<div *ngIf="data">
		<input type="hidden" name="data.modifyTag" [(ngModel)]="data.modifyTag" />
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label for="data.chnlType" class="col-lg-2 control-label">{{('channel.chnlType' | translate) || '渠道类型：'}}</label>
					<div class="col-lg-3">
						<label class="radio-inline c-radio">
							<input type="radio" name="data.slaLevel" [disabled]="data.isDisabled" [checked]="data.chnlType === '1'" (click)="data.chnlType = '1'"/> 
							<span class="fa fa-check"></span>{{('channel.innerChnl' | translate) || '内部渠道'}}
						</label>				
						<label class="radio-inline c-radio">
							<input type="radio" name="data.slaLevel" [disabled]="data.isDisabled" [checked]="data.chnlType === '2'" (click)="data.chnlType = '2'"/> 
							<span class="fa fa-check"></span>{{('channel.outterChnl' | translate) || '外部渠道'}}
						</label> 
					</div>
				</div>
				<div *ngIf="data.chnlType === '2'">
					<div class="form-group">
						<label for="data.enterpriseCode" class="col-lg-2 control-label">{{('channel.enterpriseCode' | translate) || '组织机构代码：'}}</label>
						<div class="col-lg-3">
							<input class="form-control" type="text" [(ngModel)]="data.enterpriseCode" #nodeName="ngModel" name="data.enterpriseCode"
							[disabled]="data.isDisabled" placeholder="{{('channel.add.enterpriseCodePlaceholder' | translate) || '请输入渠道名称！'}}" 
							maxlength=48/>
						</div>
					</div>
					<div class="form-group">
						<label for="data.corporation" class="col-lg-2 control-label">{{('channel.corporation' | translate) || '企业法人：'}}</label>
						<div class="col-lg-3">
							<input class="form-control" type="text" [(ngModel)]="data.enterpriseLegal" #nodeName="ngModel" name="data.enterpriseLegal" required
							[disabled]="data.isDisabled" placeholder="{{('channel.add.corporationPlaceholder' | translate) || '请输入企业法人！'}}" 
							maxlength=48/>
						</div>
					</div>
					<div class="form-group">
						<label for="data.corporationID" class="col-lg-2 control-label">{{('channel.corporationID' | translate) || '法人身份证：'}}</label>
						<div class="col-lg-3">
							<input class="form-control" type="text" [(ngModel)]="data.legalCertNum" #nodeName="ngModel" name="data.legalCertNum"
							[disabled]="data.isDisabled" placeholder="{{('channel.add.corporationIDPlaceholder' | translate) || '请输入法人身份证！'}}" 
							maxlength=48/>
						</div>
					</div>					
				</div>											
				<div class="form-group">
					<label for="data.nodeSubType" class="col-lg-2 control-label">{{('channel.chnlName' | translate) || '渠道名称：'}}</label>
					<div class="col-lg-3">
						<input class="form-control" type="text" [(ngModel)]="data.chnlName" #nodeName="ngModel" name="data.chnlName" required
						[disabled]="data.isDisabled" placeholder="{{('channel.add.chnlNamePlaceholder' | translate) || '请输入渠道名称！'}}" 
						maxlength=20/>
					</div>
				</div>				
				<div class="form-group">
					<label for="data.contact" class="col-lg-2 control-label">{{('channel.contactName' | translate) || '联系人名称：'}}</label>
					<div class="col-lg-3">
						<input class="form-control" type="text" [(ngModel)]="data.contact" #nodeName="ngModel" name="data.contact" required
							[disabled]="data.isDisabled" placeholder="{{('channel.contactNamePlaceholder' | translate) || '请输入联系人名称！'}}" 
							maxlength=120/>
					</div>
				</div>
				<div class="form-group">
					<label for="data.phone" class="col-lg-2 control-label">{{('channel.contactPhone' | translate) || '联系人电话：'}}</label>
					<div class="col-lg-3">
						<input class="form-control" type="text" [(ngModel)]="data.phone" #nodeName="ngModel" name="data.phone"
							[disabled]="data.isDisabled" placeholder="{{('channel.contactPhonePlaceholder' | translate) || '请输入联系人电话！'}}" 
							maxlength=120/>
					</div>				
				</div>
				<div class="form-group">
					<label for="" class="col-lg-2 control-label">{{('channel.areaName' | translate) || '渠道地址：'}}</label>
					<div class="col-lg-3">
						<ng-select ngModel [items]="provinces" [required]="true" [(ngModel)]="data.province" name="data.province"
							#province (selected)="provinceSelected($event)" placeholder="{{('crm.component.node.usesAddressSelect' | translate) || '--请选择--'}}"
							[disabled]="data.isDisabled" > </ng-select>
					</div>
					<div class="col-lg-3">
						<ng-select ngModel [required]="true" [(ngModel)]="data.area"  name="data.area"
							#city (selected)="citySelected($event)" placeholder="{{('crm.component.node.usesAddressSelect' | translate) || '--请选择--'}}"
							[disabled]="data.isDisabled" > </ng-select>
					</div>
				</div>
				<div class="form-group">
					<label for="data.address" class="col-lg-2 control-label"></label>
					<div class="col-lg-6">
						<input class="form-control" type="text" [(ngModel)]="data.address" #equipUsesAddress="ngModel"
							name="data.address" required placeholder="{{('channel.add.areaPlaceholder' | translate) || '请输入渠道地址！'}}" [disabled]="data.isDisabled" 
							maxlength=120/>
					</div>
				</div>				
<!-- 				<div class="form-group">
					<label for="data.settleType" class="col-lg-2 control-label">{{('channel.settleType' | translate) || '渠道结算方式：'}}</label>
					<div class="col-lg-3">
						<label class="radio-inline c-radio">
							<input type="radio" name="data.settleType" [disabled]="data.isDisabled" [checked]="data.settleType === '1'" (click)="data.settleType = '1'"/> 
							<span class="fa fa-check"></span>{{('channel.recharge' | translate) || '预充值'}}
						</label>				
						<label class="radio-inline c-radio">
							<input type="radio" name="data.settleType" [disabled]="data.isDisabled" [checked]="data.settleType === '2'" (click)="data.settleType = '2'"/> 
							<span class="fa fa-check"></span>{{('channel.postPay' | translate) || '后付费'}}
						</label> 					
					</div>				
				</div> -->
				<div class="form-group">
					<div class="col-lg-2"></div>
					<div class="col-lg-2">
						 <button type="button" pButton label="{{('channel.add.setQuota' | translate) || '继续，设置渠道折扣'}}" (click)="quato()" style="float:left"></button>
					</div>
					<div class="col-lg-1">
						<button type="button" pButton label="{{('channel.add.submit.submitButton' | translate) || '提交'}}" (click)="submit()" style="float:left"></button>
					</div>
					<div class="col-lg-1">
						<button type="button" pButton label="{{('channel.add.cancel.cancelButton' | translate) || '取消'}}" (click)="cancel()" style="float:left"></button>
					</div>					
				</div>
			</div>
		</div>
	</div>
</form>
